package com.dayu.service.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dayu.dao.merchant.MerchantDaoI;
import com.dayu.entity.Merchant;
import com.dayu.service.MerchantService;

/**
 * @author dayu
 * @date 2018/11/01
 */
@Service
public class MerchantServiceImpl implements MerchantService {

    @Autowired
    private MerchantDaoI merchantDao;

    @Override
    public void insertMerchant(Merchant merchant) {
        merchantDao.insertMerchant(merchant);
    }

    @Override
    public Merchant getMerchantById(int id) {
        // TODO Auto-generated method stub
        return merchantDao.getMerchantById(id);
    }

    @Override
    public List<Merchant> getMerchantListByType(int merchantType) {
        return merchantDao.getMerchantListByType(merchantType);
    }

    @Override
    public void updateMerchant(Merchant merchant) {
        merchantDao.updateMerchant(merchant);
    }

    @Override
    public void deleteMerchantById(int id) {
        merchantDao.deleteMerchantById(id);
    }

}
